#!/bin/bash
# 配置所在的目录

echo -e "\033[31m ------------------修改进程调度策略------------------- \033[0m "
echo -e "\033[31m 1.修改进程策略为FIFO，优先级98 \033[0m "
echo -e "adb shell chrt -f -p $1 1"
echo -e "\033[31m 2.修改进程策略为RR，优先级98 \033[0m "
echo -e "adb shell chrt -r -p $1 1"
echo -e "\033[31m 3.修改进程策略为Other \033[0m "
echo -e "adb shell chrt -o -p $1 0"

echo -e "\n\033[31m -------------------修改进程优先级-------------------- \033[0m "
echo -e "\033[31m 1.修改进程PID为$1的进程的nice值为0 \033[0m "
echo -e "adb shell renice -n 0 -p $1"

echo -e "\n\033[31m ------------------修改进程CPU亲和性------------------- \033[0m "
echo -e "\033[31m 1.修改进程PID为$1的进程的CPU亲和性为0-7 \033[0m "
echo -e "adb shell taskset -p ff $1"
echo -e "\033[31m 1.修改进程PID为$1的进程及所有子线程的CPU亲和性为0-7 \033[0m "
echo -e "adb shell taskset -a -p ff $1"


